package com.bestv.database.vo;

/**
 * Created by Henry on 14-5-20.
 */
public abstract class Item extends Base {
    protected String name;
    protected Integer typeId;

    public boolean isSeries() {
        return typeId == 1 || typeId == 5 || typeId == 6;
    }

    public String toHTML() {
        StringBuilder sbItem = new StringBuilder();
        sbItem.append("<table>");
        sbItem.append(String.format("<tr><td>%s</td><td>%s</td></tr>", "id",        id));
        sbItem.append(String.format("<tr><td>%s</td><td>%s</td></tr>", "mediaCode", mediaCode));
        sbItem.append(String.format("<tr><td>%s</td><td>%s</td></tr>", "name",      name));
        sbItem.append(String.format("<tr><td>%s</td><td>%s</td></tr>", "typeId",    typeId));
        sbItem.append("</table>");
        return sbItem.toString();
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getTypeId() {
        return typeId;
    }

    public void setTypeId(Integer typeId) {
        this.typeId = typeId;
    }
}
